package com.tiancheng.trade.settlement.service.settlement.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tiancheng.trade.settlement.exception.BusinessException;
import com.tiancheng.trade.settlement.mapper.settlement.PaymentOrderMapper;
import com.tiancheng.trade.settlement.model.settlement.PaymentOrder;
import com.tiancheng.trade.settlement.service.settlement.IPaymentOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Auther: liudong
 * @Date: 2024/4/28 16:19
 * @Param ${tags}
 * @Description: 流水待记账表
 */
@Service
public class PaymentOrderService implements IPaymentOrderService {
    @Autowired
    PaymentOrderMapper paymentOrderMapper;

    @Override
    public PaymentOrder getPaymentOrder(String flowId) throws BusinessException {
        QueryWrapper<PaymentOrder> conditions = new QueryWrapper<>();
        conditions.eq("flow_id", flowId);
        return paymentOrderMapper.selectOne(conditions);
    }
}
